package com.apotik.legenda.model;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="apt_sales_trx_item")
public class SalesTrxObat implements Serializable {
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="ID")
	private Long salesTrxObatId;
	
	@ManyToOne
	@JoinColumn(name="sales_trx", nullable=false)
	private SalesTrx salesTrx;
	
	@ManyToOne
	@JoinColumn(name="product", nullable=false, referencedColumnName="product_code")
	private Product product;
	
	@Column(name="product_code", nullable=false)
	private String productCode;
	
	@Column(name="product_name", nullable=false)
	private String productName;
	
	@Column(name="amount_unit_price", nullable=false)
	private BigDecimal amountUnitPrice;
	
	@Column(name="product_quantity", nullable=false)
	private Integer quantity;
	
	@Column(name="amount_sc")
	private BigDecimal amountSC;
	
	@Column(name="amount_trx_obat", nullable=false)
	private BigDecimal amountTrxObat;
	
	@Column(name="product_discount", nullable=false)
	private Integer discount;

	@Column(name="amount_discount")
	private BigDecimal amountDiscount;

	
	
	public Long getSalesTrxObatId() {
		return salesTrxObatId;
	}

	public void setSalesTrxObatId(Long salesTrxObatId) {
		this.salesTrxObatId = salesTrxObatId;
	}

	public SalesTrx getSalesTrx() {
		return salesTrx;
	}

	public void setSalesTrx(SalesTrx salesTrx) {
		this.salesTrx = salesTrx;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public BigDecimal getAmountUnitPrice() {
		return amountUnitPrice;
	}

	public void setAmountUnitPrice(BigDecimal amountUnitPrice) {
		this.amountUnitPrice = amountUnitPrice;
	}

	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	public BigDecimal getAmountSC() {
		return amountSC;
	}

	public void setAmountSC(BigDecimal amountSC) {
		this.amountSC = amountSC;
	}

	public BigDecimal getAmountTrxObat() {
		return amountTrxObat;
	}

	public void setAmountTrxObat(BigDecimal amountTrxObat) {
		this.amountTrxObat = amountTrxObat;
	}

	public Integer getDiscount() {
		return discount;
	}

	public void setDiscount(Integer discount) {
		this.discount = discount;
	}

	public BigDecimal getAmountDiscount() {
		return amountDiscount;
	}

	public void setAmountDiscount(BigDecimal amountDiscount) {
		this.amountDiscount = amountDiscount;
	}

}
